#pragma once

#include "IGUIElement.h"

class GUIMenuItem : public IGUIElement
{
public:
	typedef std::vector<Pointer<GUIMenuItem>> Vector_t;

	GUIMenuItem();
	void Location( Maths::Point<unsigned int>& location );
	void Paint();
	bool ReceiveEvent( IEvent& event );
	void Title( std::string& title );
	std::string Title() const;
	void Font( std::string& font );
	void Font( HashedString& font );
	HashedString Font() const;
	void FontColor( unsigned int color );
	unsigned int FontColor() const;
	void Background( std::string& font );
	void Background( HashedString& font );
	HashedString Background() const;
	void Open( bool open );
	bool Open() const;
	void AddElement( Pointer<IGUIElement> element );
	unsigned int TotalHeight() const;
	unsigned int TotalWidth() const;
	void TextHeight( unsigned int textHeight );
protected:
	void CalculateHeight();
	void CalculateWidth();

	bool m_isOpen;
	HashedString m_background;
	HashedString m_font;
	unsigned int m_fontColor;
	std::string m_title;
	unsigned int m_totalHeight;
	unsigned int m_totalWidth;
	unsigned int m_textHeight;
	IGUIElement::Vector_t m_elements;
};